﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


class Student
{
    private string firstName;
    private string lastName;
    private string facultyNumber;

    public string FacultyNumber
    {
        get { return facultyNumber; }
    }

    public string LastName
    {
        get { return lastName; }
    }

    public string FirstName
    {
        get { return firstName; }
    }

    public Student(string firstName, string lastName, string facultyNumber)
    {
        this.firstName = firstName;
        this.lastName = lastName;
        this.facultyNumber = facultyNumber;
    }

    public Student(string studentInfo)
    {
        string[] info = studentInfo.Split(':');
        this.firstName = info[0];
        this.lastName = info[1];
        this.facultyNumber = info[2];
    }

    public override string ToString()
    {
        String stringRepresentation = this.FirstName + ":" + this.LastName + ":" + this.FacultyNumber;
        return stringRepresentation;
    }

    public override bool Equals(object obj)
    {
        Student other = obj as Student;
        if (other.FirstName == this.FirstName && other.LastName == this.LastName && other.FacultyNumber == this.FacultyNumber)
        {
            return true;
        }
        return false;
    }
}

